package 星期六;


import java.util.Scanner;

public class 练习1 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入数字");
        int im = scan.nextInt();
        if (im%2==0){
            for (int i =1 ; i<=im;i++){//行
                for (int j = 1; j<=im-i;j++){//列
                    System.out.print(" ");
                }
                for (int d  = 1;d<=i;d++){//
                    System.out.print("*");
                }
                System.out.println();
            }
        }else {
            for (int i = 1;i<=im;i++){
                for (int j =1;j<=i;j++){
                    System.out.print("*");
                }
                System.out.println();
            }
        }














    }


}



